import request from './request'

//请求首页数据
export const GetHomeData = () => request.get('/index/index')

//获取popup的数据
export const GetPopupData = () => request.get('/search/index')

//获取搜索框商品的数据
export const GetSearchData = (params) => request.get('/goods/list',{params})

//实施搜索
export const GettimeData = (params) => request.get('/search/helper',{params})

//清除历史记录
export const GetTdeleteData = () => request.post('/search/clearhistory')

//获取分类列表数据
export const GetListData = () => request.get('/catalog/index')

//获取分类列表内容
export const GetListidData = (params) => request.get('/catalog/index',{params})

//获取分类数据
export const GetCateData = (params) => request.get('/goods/category',{params})

//产品详情
export const GetDetailData = (params) => request.get('/goods/detail',{params})

//加入购物车
export const GetaddData = (params) => request.post('/cart/add',params)

//获取购物车的数据
export const GetaddListData = () => request.get('/cart/index')

//修改选择商品
export const GetEventList = (params) => request.post('/cart/checked',params)

//删除商品
export const GetDeleteList = (params) => request.post('/cart/delete',params)